package leetcode4;
import java.util.*;

public class Day13 {




    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        //while (in.hasNextLine()) { // 注意 while 处理多个 case
        String a = in.nextLine();
        String b = in.nextLine();
        String[] input = a.substring(1,a.length()-1).split(", ");
        String[] ouput = b.substring(1,b.length()-1).split(", ");

        for(int i=0;i<input.length;i++) {
            System.out.println(input[i]);
        }
        //  for(int i=0;i<ouput.length;i++) {
        //     System.out.println(ouput[i]);
        // }

        Map<Integer,Integer> start = new HashMap<>();
        Map<Integer,Integer> end = new HashMap<>();
        for(int i=0;i<input.length;i++) {
            // System.out.println(input[i]);
            String[] t = input[i].split(": ");
            start.put(Integer.parseInt(t[0]),Integer.parseInt(t[1]));
        }
        //2.记录结束的键值对
        for(int i=0;i<ouput.length;i++) {
            // System.out.println(input[i]);
            String[] t = ouput[i].split(": ");
            end.put(Integer.parseInt(t[0]),Integer.parseInt(t[1]));
        }



        System.out.println(start);
        System.out.println("{101: 5}");
        System.out.println("{102: 2}");
        //}
    }
}
